home *** CD-ROM | disk | FTP | other *** search
/ Software 2000 / Software 2000 Volume 1 (Disc 1 of 2).iso / utilities / u258.dms / in.adf / UserDocs / Manual_Pages / ARun < prev    next >
Encoding:
Text File  |  1988-02-12  |  4.9 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      ARun(REL2)             ARP User's    Manual            ARun(REL2)
  5.  
  6.  
  7.  
  8.      NAME
  9.       ARun - Run a process in the background.
  10.  
  11.      SYNOPSIS
  12.       ARun Program_Command/... </k >/k NOIO/S STACK/K PRI/K
  13.  
  14.      Description
  15.       ARun starts up programs as background    processes, similarly
  16.       to the AmigaDOS Run command. One of the big differences
  17.       between Run and ARun is that ARun knows about    ARP's resident
  18.       list,    and can    take advantage of programs that    you have
  19.       placed there (see the    manual page for    Resident for more
  20.       information).     Resident programs load    quicker, and save you
  21.       lots of memory. In addition, ARun allows you to set the size
  22.       of the stack for the new process, its    priority, and to
  23.       redirect IO for the new process.  You    can also tell ARun
  24.       that you don't want any default files    opened for this
  25.       process, but this must be done with care.
  26.  
  27.       Programs which begin with the    new ARP    resident program tag
  28.       (as all ARP programs currently do) will also have the    stack
  29.       size for the program set automatically by ARun, whether or
  30.       not they are installed on the    resident list.    This means
  31.       memory savings, and no more crashes due to stack problems.
  32.  
  33.       The NOIO switch launches a program without any default file
  34.       handles.  This is useful when    you want to launch a program
  35.       from the CLI and then    close it later,    but still have the
  36.       background process running.  Without the NOIO    option,    the
  37.       CLI window will not close until the last process launched
  38.       from that cli    has terminated.     Care must be used with    this
  39.       option, since    many programs need default file    handles    to
  40.       operate correctly.
  41.  
  42.      EXAMPLE
  43.       Launch a program with    priority -5, stacksize of 4000 and
  44.       noio:
  45.  
  46.           ARun MyProgram Mycommands    NOIO STACKSIZE 4000 PRI    -5
  47.  
  48.       The same process under AmigaDOS would    be accomplished    in
  49.       this way:
  50.  
  51.       Stack    4000       ; set the stack
  52.       ChangeTaskPri    -5 ; set the priority, things slow down    here!
  53.       Run <NIL: >NIL: MyProgram Mycomands ;    launch
  54.       ChangeTaskPri    0  ; reset the priortiy
  55.       Stack    10240       ; reset the stack.
  56.  
  57.       The arp command is much more convenient.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 2/22/88)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      ARun(REL2)             ARP User's    Manual            ARun(REL2)
  71.  
  72.  
  73.  
  74.      DIFFERENCES
  75.       The AmigaDOS Run command does    not use    its own    argument
  76.       parser, and it spawns    a subshell to handle the commands for
  77.       you.    These two differences in implementation    cause the
  78.       following changes in the behavior of Arun from Run:
  79.  
  80.       Argument parser - since ARun DOES use    the ARP    argument
  81.           parser, you have the same convenience    in entering
  82.           commands with    ARun as    you do with the    rest of    the
  83.           ARP commands.     The only problem occurs when you need
  84.           to pass a quoted argument to a sub-process, this
  85.           occurs rarely, but it    can happen.  Here is how it is
  86.           done:
  87.  
  88.                   ARun Command "\"Quoted Arg\""
  89.  
  90.           Where    the \ represents the current escape character
  91.           (see Set).  The outer    quotes are for ARun, and the
  92.           Escaped Quotes tell ARun (or the argument parser) to
  93.           send the argument to the subprocess as a quoted
  94.           string.
  95.  
  96.       Subshell - ARun does not spawn a subshell, this has its good
  97.           side and its bad.  The good side is that this    is a
  98.           very low overhead command, and folks are now free to
  99.           replace the CLI shell.  The bad side is that you
  100.           can't    pass through lists of arguments.  Therefore
  101.           the run command+ feature of Run will not work    with
  102.           ARun.     This will be taken care of by an actual
  103.           invokable shell, as it should    have been done in the
  104.           first    place.
  105.  
  106.      IMPORTANT NOTE
  107.       This program is called ARun and not RUN for a    good reason:
  108.       we don't want    you to delete your Run program just yet.  The
  109.       problem is that AmigaDOS provided a program function call
  110.       which    loads and runs another program.     The problem with that
  111.       is that in order to run the program this function call first
  112.       loads    and runs Run, and Run runs the program.     If this seems
  113.       strange to you, it is    probably because it is strange.
  114.  
  115.       Unfortunately, some programs out there have used this
  116.       function call, and won't work    if the AmigaDOS    run is
  117.       missing.  Actually, they won't work if the AmigaDOS run is
  118.       not in the C:    directory, and many problems with this have
  119.       been encountered by users and    programmers.  ARP has now
  120.       provided a replacement for this function call    which works
  121.       much better, and does    not rely on any    other program being
  122.       anywhere.  New programs will probably    use this, but until
  123.       more of them do, and the CLI is ultimately replaced, delete
  124.       Run only if you know it won't    interfere with things.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 2/22/88)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      ARun(REL2)             ARP User's    Manual            ARun(REL2)
  137.  
  138.  
  139.  
  140.       Actually, a good side    to this    is that    you can    leave Run in
  141.       your C: directory, and place ARun in your ramdisk, using it
  142.       instead.  Most of the    past problems with Run have been
  143.       caused by people moving it into another directory and    then
  144.       into their RAM: disk.
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                         (printed 2/22/88)
  196.  
  197.  
  198.  
  199.